package com.valley.boot;

import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtMethod;

public class TransformCode extends AbstractTransform{

    public static final String className = "com.a.b.c.d.A";


    @Override
    protected void transformClass(ClassPool classPool, CtClass ctClass) throws Exception {
        CtMethod ctMethod = ctClass.getDeclaredMethod("isOne");
        ctMethod.insertBefore("if(true) return true;");
    }

    @Override
    protected String getClassName() {
        return className;
    }
}
